<!DOCTYPE html>
<HTML>
<HEAD><meta name="viewport" content="width=device-width, initial-scale=1">
<Title>CandleStickLayer.setExtraColors</Title>
<link type='text/css' rel='Stylesheet' href="maxchartapi.css" />
</HEAD>
<body bgcolor="#FFFFFF" text="#000000" topmargin="0" leftmargin="0" rightmargin="0" marginwidth="0" marginheight="0">

<p class="heading0">ChartDirector 7.0 (Java Edition)</p>
<p class="heading1"><a href="CandleStickLayer.htm">CandleStickLayer</a>.<wbr>setExtraColors</p>
<hr class="separator">
<p class="heading2a">Usage</p>
<div class="content">
public void setExtraColors(int upDownFillColor, int upDownLineColor, int downDownFillColor, int downDownLineColor [, double leadValue ])
</div>
<p class="heading2">Description</p>
<div class="content">
Configures additional colors for candlesticks.<br><br>
The standard way to color a candlestick is to color it using the method as mentioned in <a href="CandleStickLayer.setColors.htm">CandleStickLayer.setColors</a>, in which "up" is defined as the closing price higher than or equal to the opening price.<br><br>
In some applications, it may be desirable to vary the candlestick colors based on an alternative definition of "up" and "down", in which "up" is defined as the closing price higher than or equal to that of the previous trading session.<br><br>
With these two definitions of "up" and "down", a candlestick can have 4 states. It can be "up/up" ("up" as according to both the standard and alternative definitions), "up/down" ("up" according to the standard definition, "down" according to the alternative definition), "down/up" or "down/down".<br><br>
The <b>setExtraColors</b> method can be used to configure the "up/down" and "down/down" colors. If this method is used, the colors configured with <a href="CandleStickLayer.setColors.htm">CandleStickLayer.setColors</a> will be considered as the "up/up" and "down/up" colors.
</div>
<p class="heading2">Arguments</p>
<div class="content">
<div style="width:100%;box-sizing:border-box;">
<table border="1" cellpadding="5" cellspacing="0" width="100%"> 
<tr>
<th width="19%">Argument</th><th width="19%">Default</th><th>Description</th>
</tr>
<tr>
<td>upDownFillColor</td><td>(Mandatory)</td><td>The fill color for "up/down" days.</td></tr><tr><td>upDownLineColor</td><td>(Mandatory)</td><td>The line color for "up/down" days.</td></tr><tr><td>downDownFillColor</td><td>(Mandatory)</td><td>The fill color for "down/down" days.</td></tr><tr><td>downDownLineColor</td><td>(Mandatory)</td><td>The line color for "down/down" days.</td></tr><tr><td>leadValue</td><td>[-Infinity]</td><td>The closing price before the first trading session, which is used to determine if the first trading session is "up" or "down" according to the alternative definition.</td>
</tr>
</table>
</div>
</div>
<p class="heading2">Return Value</p>
<div class="content">
None
</div>
<br><hr class="separator">
<div class="copyright">&copy; 2022 Advanced Software Engineering Limited. All rights reserved.</div>
</body>
</HTML>
